var province_name=$('#province').find("option:selected").text();
var city_name=$('#city').find("option:selected").text();
var county_name=$('#county').find("option:selected").text();
var company_name = province_name+city_name+county_name;
$('#company_address').val(company_name);
$("#province").change(function() {
	var province = $("#province").val();
	province = province.substr(0,6); //字符分割 
	$.ajax({
		url:"/wap/area/city/"+province,
		type:"post",
		dataType: 'json',
		success:function(data){
			$('#city').empty(); 
			$('#city').append(data.city);
			$('#county').empty(); 
			$('#county').append(data.county);
		}	
	});
});

$("#city").change(function(){
	var city = $("#city").val();
	city = city.substr(0,6); //字符分割 
	$.ajax({
		url:"/admin/area/county/"+city,
		type:"post",
		dataType: 'json',
		success:function(data){
			$('#county').empty(); 
			$('#county').append(data.county);
		}	
	});
});
$("#county").change(function(){
	var province_name=$('#province').find("option:selected").text();
	var city_name=$('#city').find("option:selected").text();
	var county_name=$('#county').find("option:selected").text();
	var company_name = province_name+city_name+county_name;
	$('#company_address').val(company_name);			
});

